using System;

namespace Core.Demo09_ExposeStaticMethod
{
	public class NetworkProtocol
	{
		public NetworkProtocol()
		{
			throw new ApplicationException("I am yet another Bad boy");
		}

		public const int MAX_LENGTH = 100;

		public bool validate(Packet packet)
		{
			return packet.Length <= MAX_LENGTH;
		}


//		public bool validate(Packet packet)
//		{
//			return validatePacket(packet);
//		}
//
//		public static bool validatePacket(Packet packet)
//		{
//			return packet.Length <= MAX_LENGTH;
//		}
	}

	public class Packet
	{
		public decimal Length { get; set; }
	}
}